<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // Symbol是es6新增的一种数据类型，值是唯一的，主要用来解决命名冲突问题
        // Symbol
      /*   let symbol1 = Symbol();
        console.log(symbol1);
        let symbol2 = Symbol();
        console.log(symbol2);
        console.log(symbol1 == symbol2);
        console.log(typeof symbol1);
        let obj = {
            name:'tom',
            msg:'我不热，我很凉快'
        }
        obj.name = 'jack';
        obj[symbol1] = 'xxx';
        console.log(obj);
        obj[symbol2] = 'yyy'; */
        // BigInt 大整型
        // 同number类型相似 在数据后面添加n  它表示整型，没有位数限制
        // infinity
    
        let a = 123;
        console.log(typeof a);
        let aa = 123n;
        console.log(typeof aa);
        let bb = 11n;
        console.log(aa+bb);
        console.log(a == aa);
        console.log(-aa);//写—代表负值，不能写+
        console.log(aa);

        // BigInt这个函数
        console.log(BigInt(123));//123n
        console.log(BigInt('123'));//123n
        console.log(BigInt(false));//0n
        console.log(BigInt(true));//1n

        // 
        console.log(Boolean(0n));//false
        console.log(Boolean(-10n));//其余都为true
        console.log(Number(120n));
        console.log(String(1552n));

        console.log(!0n);
        console.log(!456n);



    </script>
</body>
</html>